class PuzaOperator:
    def __init__(self):
        pass
    
    def Apply(self, local_input = None):
        return local_input

    def Post(self):
        return None

class PuzaDistinctOperator(PuzaOperator):
    def __init__(self):
        PuzaOperator.__init__(self)
        self._pool = set()
    
    def Apply(self, local_input = None):
        self._pool.add(local_input)        
        return None
    
    def Post(self):
        results = {}
        results['items'] = list(self._pool)
        return results

class PuzaCountOperator(PuzaDistinctOperator):
    def __init__(self):
        PuzaDistinctOperator.__init__(self)
    
    def Post(self):
        results = {}
        results['counts'] = len(self._pool)
        return results